﻿@model KL.Store.Web.Models.HomeModel
@using KL.Store.Core
@{
    //ViewBag.Title = "Ana Sayfa";
    ViewBag.hasSub = "false";
    var solSidebarJJGoster = false;
    var homeSort = 6;
    if (Parameters.Theme == "JJ" || Parameters.Theme == "WU")
    {
        solSidebarJJGoster = true;
    }
    else if (Parameters.Theme == "JB")
    {
        homeSort = 7;
    }
    var sidebarClass = "col-xs-12 col-sm-12 col-md-3 col-lg-2 left first last";
    if (Parameters.Theme == "WU")
    {
        sidebarClass = "col-xs-12 col-sm-12 col-md-3 col-lg-3 left";
    }
}
@if (Parameters.Theme != "JJ" && Parameters.Theme != "JB" && Parameters.Theme != "EO" && !string.IsNullOrEmpty(Parameters.PageLeftInstallmentAndReturn))
{
    <div class="PageLeftInstallmentAndReturn">
        @Html.Raw(Parameters.PageLeftInstallmentAndReturn)
    </div>
}
@*Mobile Slider*@
<div class="col-xs-12 col-sm-12 hidden-md hidden-lg first last">
    <div class="mobileSlider">
        @foreach (var banner in Model.BannerList)
        {
            if (string.IsNullOrEmpty(banner.Url))
            { 
            <img src="@(Parameters.WebSiteImageUrl)/banner/@(banner.BannerID).jpg" alt="@(banner.Name)" class="slider_image" />
            }
            else
            { 
            <a href="@(banner.Url)">
                <img src="@(Parameters.WebSiteImageUrl)/banner/@(banner.BannerID).jpg" alt="@(banner.Name)" class="slider_image" />
            </a>
            }
        }
    </div>
</div>
<div class="clearfix"></div>
<script>
    $(document).ready(function ()
    {
        // version 03.05.2015 
        if ($(document).width() < 1000)
        {
            $(".mobileSlider").slidesjs({
                pagination: {
                    active: false
                },
                navigation: {
                    active: false
                },
                play: {
                    active: false,
                    effect: "slide",
                    interval: 5000,
                    auto: true,
                    swap: false,
                    pauseOnHover: true,
                    restartDelay: 4500
                },
                callback: {
                    loaded: function ()
                    {

                    },
                    start: function ()
                    {

                    },
                    complete: function ()
                    {
                        $(".mobileSlider a.slidesjs-navigation").html("");
                        var maxImgSize = 0;
                        $('.mobileSlider .slidesjs-container .slidesjs-control .slidesjs-slide').each(function ()
                        {
                            var imgSizeControl = $(this).height();
                            if (imgSizeControl > maxImgSize)
                            {
                                maxImgSize = imgSizeControl;
                            }
                        });
                        if (maxImgSize > 0)
                        {
                            $('.mobileSlider .slidesjs-container').height(maxImgSize + 15);
                            $('.mobileSlider .slidesjs-container .slidesjs-control').height(maxImgSize + 15);
                        }
                    }
                }
            });
            $(".mobileSlider a.slidesjs-navigation").html("");
            var maxImgSize = 0;
            $('.mobileSlider .slidesjs-container .slidesjs-control .slidesjs-slide').each(function ()
            {
                var imgSizeControl = $(this).height();
                if (imgSizeControl > maxImgSize)
                {
                    maxImgSize = imgSizeControl;
                }
            });
            if (maxImgSize > 0)
            {
                $('.mobileSlider .slidesjs-container').height(maxImgSize + 15);
                $('.mobileSlider .slidesjs-container .slidesjs-control').height(maxImgSize + 15);
            }
        }
    });
</script>
@*Mobile Slider*@
@if (solSidebarJJGoster)
{
    <div class="@(sidebarClass)">
        @if (User.Identity.IsAuthenticated && Parameters.UseWishList)
        {
            Html.RenderAction("RelatedLists", "Partials");
        }
        @{Html.RenderAction("Categories", "Partials"); }
        @{if (Parameters.ShowBrandSelection)
          {
              Html.RenderAction("Brands", "Partials");
          }
        }
        @if (!string.IsNullOrEmpty(Parameters.HomePageLeftBanner))
        {         
            <div class="hidden-xs hidden-sm">
                @Html.Raw(Parameters.HomePageLeftBanner)
                @{Html.RenderAction("ManageContentLink", "Partials", new { id = 95 });}
            </div>
        }
        @if (Parameters.ShowTopSellersOnHomePage)
        {
            if (Parameters.Theme == "WU")
            {
            <div class="bestSellerOnIndexSidebar">
                @{Html.RenderAction("BestSeller2", "Partials", new { totalItemCount = 24 });}
            </div>
            }
            else
            {
                Html.RenderAction("BestSeller", "Partials");
            }
        }
        @if (Parameters.ShowFBLikeboxOnHome)
        {
            <div class="hidden-xs hidden-sm">
                @{Html.RenderAction("FacebookLikeBox", "Partials");}
            </div>
        }
    </div>
}
@if (Parameters.Theme == "EO")
{
    <div class="hidden-xs hidden-sm col-md-4 col-lg-3 first">
        @{Html.RenderAction("Categories", "Partials");}
        @if (Parameters.ShowBrandSelection)
        {
            Html.RenderAction("Brands", "Partials");
        }
        <div id="home-sidebar">
            @Html.Raw(Parameters.HomePageSideBanner)
        </div>
        @Html.Raw(Parameters.FaceBookLikebox)
    </div>
}
@if (Model.BannerList.Count > -1)
{
    if (Parameters.HomePageSliderType == 1)
    {
          
    <section id="slider-wrapper">
        <div class="container_24 clearfix">
            <div class="hidden-xs hidden-sm grid_18">
                <div id="minic_slider" class="theme-default">
                    <div id="slider" class="nivoSlider" style="margin-bottom: 0; display: inline-block;">
                        @foreach (var banner in Model.BannerList)
                        {
                            if (string.IsNullOrEmpty(banner.Url))
                            { 
                            <img src="@(Parameters.WebSiteImageUrl)/banner/@(banner.BannerID).jpg" alt="@(banner.Name)" class="slider_image" />
                            }
                            else
                            { 
                            <a href="@(banner.Url)">
                                <img src="@(Parameters.WebSiteImageUrl)/banner/@(banner.BannerID).jpg" alt="@(banner.Name)" class="slider_image" />
                            </a>
                            }
                        }
                    </div>
                </div>
                <script type="text/javascript">
                    $(window).load(function ()
                    {
                        if ($(window).width() > 767)
                        {
                            $('#slider').nivoSlider({
                                effect: 'fade',
                                slices: 15,
                                boxCols: 8,
                                boxRows: 4,
                                animSpeed: 500,
                                pauseTime: 7000,
                                startSlide: 0,
                                directionNav: true,
                                controlNav: false,
                                controlNavThumbs: false,
                                pauseOnHover: true,
                                manualAdvance: false,
                                prevText: 'Prev',
                                nextText: 'Next',
                                randomStart: false
                            });
                        }
                    });
                </script>
            </div>
            <div class="hidden-xs hidden-sm grid_6">
                @Html.Raw(Parameters.HomePageSideBanner)
            </div>
        </div>
    </section>  
    }
    else if (Parameters.HomePageSliderType == 2)
    {
        var clsSlider = "header-modules";
        if (Parameters.Theme == "EO")
        {
            clsSlider = "header-modules hidden-xs hidden-sm col-md-8 col-lg-9 first last";
        }
    <div id="headermodule" class="@clsSlider">
        <div class="slideshow">
            <div id="slideshow0" class="nivoSlider">
                @foreach (var banner in Model.BannerList)
                {
                    if (string.IsNullOrEmpty(banner.Url))
                    { 
                    <img src="@(Parameters.WebSiteImageUrl)/banner/@(banner.BannerID).jpg" alt="@(banner.Name)" />
                    }
                    else
                    { 
                    <a href="@(banner.Url)">
                        <img src="@(Parameters.WebSiteImageUrl)/banner/@(banner.BannerID).jpg" alt="@(banner.Name)" />
                    </a>
                    }
                }
            </div>
            @if (Parameters.Theme == "EO")
            {
                <div class="slider-shadow"></div>
            }
        </div>
        <script type="text/javascript">
            $(document).ready(function ()
            {
                if ($(window).width > 1000)
                {

                }
                $('#slideshow0').nivoSlider({
                    effect: 'fade',
                    animSpeed: 500,
                    pauseTime: 5000,
                    slices: 20,
                    captionOpacity: 1,
                    controlNavThumbs: false,
                    controlNavThumbsFromRel: false,
                    prevText: 'Prev',
                    nextText: 'Next',
                });
            });
        </script>
    </div>
    }
    else if (Parameters.HomePageSliderType == 3)
    {
        if (Parameters.Theme == "HA")
        {
    @Html.Raw("</div>");
    @Html.Raw(" <div id=\"header-bottom\"><div class=\"container first last\">");
        }
        else if (Parameters.Theme == "JB")
        {
    @Html.Raw("<div class=\"hidden-xs col-sm-12 col-md-12 col-lg-12 right sliderBanner\">");
        }
        else
        {
    @Html.Raw("<div class=\"hidden-xs col-sm-12 col-md-9 col-lg-10 right sliderBanner\">");
        }
        if (Parameters.Theme == "HA")
        {
    <div class="indexKategoriMenusu">
        @{Html.RenderAction("Categories", "Partials");}
    </div>
        }                
    <div class="slider slipprysl">
        @if (Model.BannerList.Count > -1)
        {
            <div>
                <ul id="slider">
                    @foreach (var banner in Model.BannerList)
                    {
                        <li>
                            @if (string.IsNullOrEmpty(banner.Url))
                            { 
                                <img src="@(Parameters.WebSiteImageUrl)/banner/@(banner.BannerID).jpg" alt="@(banner.Name)" class="slider_image" />
                            }
                            else
                            { 
                                <a href="@(banner.Url)">
                                    <img src="@(Parameters.WebSiteImageUrl)/banner/@(banner.BannerID).jpg" alt="@(banner.Name)" class="slider_image" />
                                </a>
                            }
                        </li>
                    }
                </ul>
                <div class="thumb-box">
                    <ul class="thumbs">
                        @{int slideCounter = 0;
                          foreach (var banner in Model.BannerList)
                          {
                            <li id="slide@(slideCounter + 1)"><a href="#@(slideCounter + 1)" data-slide="@(slideCounter + 1)">
                                <img src="@(Parameters.WebSiteImageUrl)/banner-thumb/@(banner.BannerID).jpg" alt="@(banner.Name)" /></a></li>
                              slideCounter++;
                          }
                        }
                    </ul>
                </div>
            </div>
            <script>
                $(function ()
                {
                    if ($(document).width() > 1000)
                    {
                        var v3slider = $('#slider').slippry({
                            // general elements & wrapper
                            slippryWrapper: '<div class="slippry_box thumbnails" />',
                            // options
                            transition: 'horizontal',
                            pager: false,
                            auto: true,
                            pause: 4500,
                            captions: false,
                            onSlideBefore: function (el, index_old, index_new)
                            {
                                $('.thumbs a img').removeClass('active').parent().css({ "background": "none" });
                                $('img', $('.thumb-box .thumbs li a')[index_new]).addClass('active');
                            @if (Parameters.Theme == "HA")
                            {
                                @Html.Raw("$('img', $('.thumb-box .thumbs li a')[index_new]).parent().css({ \"background\": \"url('/Images/HA/slider-thumbnail-top-background.jpg') repeat-y\" });");
                            }
                            }
                        });
                        $('.thumb-box .thumbs li a').click(function ()
                        {
                            v3slider.goToSlide($(this).data('slide'));
                            return false;
                        });
                    }
                });
            </script>
        }
    </div>
        if (Parameters.Theme == "HA")
        {
    @Html.Raw("</div></div>");
        }
        else
        {
    @Html.Raw("</div>");
        }
        if (Parameters.Theme == "HA")
        {
    <div class="container first last">
        @if (!string.IsNullOrEmpty(Parameters.HomePageSideBanner))
        {
            <div class="homePageBanner">@Html.Raw(Parameters.HomePageSideBanner)</div>
        }
        @{Html.RenderAction("ManageContentLink", "Partials", new { id = 98 });}
        @if (!string.IsNullOrEmpty(Parameters.LedPanelText))
        {
            <div class="ledPanel marquee">
                @{
            var marqueSpeed = Parameters.LedPanelText.Length / 4;
            if (Parameters.LedPanelText.Length < 40)
            {
                marqueSpeed = Parameters.LedPanelText.Length / 3;
            }
            if (marqueSpeed < 15)
            {
                marqueSpeed = 15;
            }
                }
                <p style="animation: marquee @(marqueSpeed)s linear infinite; -webkit-animation: marquee @(marqueSpeed)s linear infinite;">@Parameters.LedPanelText</p>
            </div>
        }
    </div>
    @Html.Raw("<div class=\"container first last\">");
        }
    }
    else if (Parameters.HomePageSliderType == 4)
    {
    <div class="std hidden-xs hidden-sm col-md-7 col-lg-7 left last">
        <div id="ei-slider" class="ei-slider">
            <ul class="ei-slider-large">
                @foreach (var banner in Model.BannerList)
                {
                    <li>@if (string.IsNullOrEmpty(banner.Url))
                        { 
                        <img src="@(Parameters.WebSiteImageUrl)/banner/@(banner.BannerID).jpg" alt="@(banner.Name)" class="slider_image" />
                        }
                        else
                        { 
                        <a href="@(banner.Url)">
                            <img src="@(Parameters.WebSiteImageUrl)/banner/@(banner.BannerID).jpg" alt="@(banner.Name)" class="slider_image" />
                        </a>
                        }
                        <div class="clearfix"></div>
                    </li>
                }
            </ul>
            <div class="clearfix"></div>
            @{int slideCounter = 0;
                <ul class="ei-slider-thumbs">
                    <li class="ei-slider-element">Current</li>
                    @foreach (var banner in Model.BannerList)
                    {
                        <li id="slide@(slideCounter + 1)">
                            <a href="#">
                                <img src="@(Parameters.WebSiteImageUrl)/banner-thumb/@(banner.BannerID).jpg" alt="@(banner.Name)" />
                                <span class="info1">@(banner.Name)</span> <span class="info2">@(banner.Name)</span>
                            </a>
                        </li>
                        slideCounter++;
                    }
                </ul>
            }
        </div>
        <div class="clearfix"></div>
    </div>
    <div class="hidden-xs hidden-sm col-md-2 col-lg-2 left dailyOffers">
        @{Html.RenderAction("DailyOffers", "Partials");}
        @Html.Raw(Parameters.HomePageSideBanner)
        @{Html.RenderAction("ManageContentLink", "Partials", new { id = 98 });}
    </div>
    <script>
        if ($(window).width() > 999)
        {
            $('#ei-slider').eislideshow({
                animation: 'center',
                autoplay: true,
                slideshow_interval: 5000,
                titlesFactor: 0,
                thumbMaxWidth: 300
            });
        }
    </script>
    }
    else
    {
    <div class="hidden-xs col-sm-12 col-md-9 col-lg-10 right sliderBanner">
        <ul class="mainSlider">
            @foreach (var banner in Model.BannerList)
            {
                if (string.IsNullOrEmpty(banner.Url))
                { 
                <li>
                    <img src="@(Parameters.WebSiteImageUrl)/banner/@(banner.BannerID).jpg" alt="@(banner.Name)" /></li>
                }
                else
                { 
                <li>
                    <a href="@(banner.Url)">
                        <img src="@(Parameters.WebSiteImageUrl)/banner/@(banner.BannerID).jpg" alt="@(banner.Name)" /></a>
                </li>
                }
            }
        </ul>
        @{ if (Model.BannerList.Count > 1)
           {
            <div id="sliderThumbs">
                @{int slideCounter = 0;
                  foreach (var banner in Model.BannerList)
                  {
                    <a data-slide-index="@(slideCounter)" href="#">
                        <img src="@(Parameters.WebSiteImageUrl)/banner-thumb/@(banner.BannerID).jpg" /></a>
                      slideCounter++;
                  }
                }
            </div>
           }
        }
        <script type="text/javascript">
            $(window).load(function ()
            {
                if ($(window).width() > 767)
                {
                    $('.mainSlider').bxSlider({
                        mode: 'horizontal',
                        easing: 'ease-in',
                        pagerCustom: '#sliderThumbs',
                        startSlide: 0,
                        slideMargin: 0,
                        moveSlides: 1,
                        infiniteLoop: true,
                        auto: true,
                        pause: 4000,
                        autoStart: true
                    });
                }
            });
        </script>
    </div> 
    }

}
@if (!string.IsNullOrEmpty(Parameters.HomePageUnderBanner) && Parameters.Theme != "HA")
{
    <div class="hidden-xs hidden-sm">
        @Html.Raw(Parameters.HomePageUnderBanner)
        @{Html.RenderAction("ManageContentLink", "Partials", new { id = 97 });}
    </div>
}

@if (Parameters.HomePageTabCategoryId > 0)
{
    <div class="tabbed-products col-xs-12 col-sm-12 col-md-9 col-lg-9 right">
        <div class="tabberlive">
            @if (Model != null && Model.HomePageTabGroups != null && Model.HomePageTabGroups.Count > 0)
            {
                <div class="tab0">
                    <ul class="tabbernav">
                        @{var groupCounter = 0;}
                        @foreach (KL.Store.Core.Domain.ProductGroup pGroup in Model.HomePageTabGroups)
                        {
                            <li class="tab1"><a @{if (groupCounter == 0)
                                                  {<text> class="selected"</text>}} title="tab" href="#group@(pGroup.GroupId)">@(pGroup.GroupName)</a></li>
                                                  groupCounter++;
                        }
                    </ul>
                </div>
                <div class="tabs">
                </div>
                        foreach (KL.Store.Core.Domain.ProductGroup pGroup in Model.HomePageTabGroups)
                        {
                <div id="group@(pGroup.GroupId)" class="tab products">
                    <div class="category-title">
                        <h2><a href="javascript:void(0);">@(pGroup.GroupName)</a></h2>
                    </div>
                    <div class="tab-content" id="tab-content-@(pGroup.GroupId)">
                        @{Html.RenderAction("Tabber", "Products", new { id = pGroup.GroupId, itemCount = Parameters.MaxProductCountForHomePage, ColumnCount = pGroup.ColumnCount, ListImageType = pGroup.ListImageType, sort = homeSort, lazyLoad = true, smallMode = false });}
                    </div>
                    <div class="tab-original" id="tab-original-@(pGroup.GroupId)" style="display: none !important;">
                    </div>
                </div>
                        }
            }
            else
            {
                <div class="tab0">
                    <ul class="tabbernav">
                        <li class="tab1"><a class="selected" title="tab" href="#group@(Model.HomePageTabGroup.CategoryId)">@(Model.HomePageTabGroup.CategoryName)</a></li>
                    </ul>
                </div>
                <div id="group@(Model.HomePageTabGroup.CategoryId)" class="tab products">
                    <div class="category-title">
                        <h2><a href="javascript:void(0);">@(Model.HomePageTabGroup.CategoryName)</a></h2>
                    </div>
                    <div class="tab-content" id="tab-content-@(Model.HomePageTabGroup.CategoryId)">
                        @{Html.RenderAction("Tabber", "Products", new { id = Model.HomePageTabGroup.CategoryId, itemCount = Parameters.MaxProductCountForHomePage, sort = homeSort, order = 1, ColumnCount = ViewBag.ColumnCount, ListImageType = ViewBag.ListImageType });}
                    </div>
                    <div class="tab-original" id="tab-original-@(Model.HomePageTabGroup.CategoryId)" style="display: none !important;">
                    </div>
                </div>
            }
            <span class="productTabImageWidths" style="display: none; visibility: hidden"></span>
        </div>
    </div>
    <div class="category-title col-xs-12 col-sm-12 hidden-md hidden-lg">
        <h2><a href="javascript:void(0);">Diğer Ürünler</a></h2>
    </div>
    
    <script>
        function productTabCarousel(firstTime)
        {
            if (!firstTime)
            {
                restoreOriginalTabs();
            }
            $(".tabbed-products .tab-content .product-carousel").each(function ()
            {
                $(this).owlCarousel({
                    loop: true,
                    margin: 10,
                    responsiveClass: true,
                    responsive: {
                        0: {
                            items: 1,
                            nav: true
                        },
                        600: {
                            items: 3,
                            nav: false
                        },
                        1000: {
                            items: 4,
                            nav: true,
                            loop: false
                        }
                    }
                });
            });
        }

        function backupOriginalTabs()
        {
            $('.tabbed-products .tab-content').each(function ()
            {
                $(this).parent().find('.tab-original').html($(this).html());
            });
        }

        function restoreOriginalTabs()
        {
            $('.tabbed-products .tab-content').each(function ()
            {
                $(this).html($(this).parent().find('.tab-original').html());
            });
        }

        function TabToggle()
        {
            if ($(window).width() > 999)
            {
                $(".tab:not(:first)").hide();

                //to fix u know who
                $(".tab:first").show();

                //when we click one of the tabs
                $(".tabbernav  li  a").click(function ()
                {
                    //get the ID of the element we need to show
                    stringref = $(this).attr("href").split('#')[1];

                    //hide the tabs that doesn't match the ID
                    $('.tab:not(#' + stringref + ')').hide();
                    //fix
                    if ($.browser.msie && $.browser.version.substr(0, 3) == "6.0")
                    {
                        $('.tab#' + stringref).show();
                        //$('.tab#' + stringref).find('.tab-content').html($('.tab#' + stringref).find('.tab-original').html());
                        //productTabCarousel();
                    }
                    else
                        //display our tab fading it in
                        $('.tab#' + stringref).fadeIn();

                    //stay with me
                    return false;
                });

                $(".tabbernav a").click(function ()
                {
                    $(".tabbernav a").removeClass("selected");
                    $(this).addClass("selected");
                    productTabCarousel();
                });
            }
        }

        $(window).resize(function ()
        {
            //productTabCarousel();
            TabToggle(false);
        });
        $(document).ready(function ()
        {
            if ($(window).width() > 999)
            {
                $('.tabbed-products').find('.productLi').removeClass('col-xs-6').removeClass('col-sm-6');
                backupOriginalTabs();
                productTabCarousel(true);
                TabToggle();
            }
        });
    </script>
}
@if (Parameters.Theme == "DK")
{
    <div class="col-xs-12 col-sm-12 col-md-4 col-lg-3 first">
        @if (Parameters.ShowBrandSelection)
        {
            Html.RenderAction("Brands", "Partials");
        }
        @if (Parameters.ShowBrandSelection)
        {
            Html.RenderAction("Categories", "Partials");
        }
    </div>
}



<script type="text/javascript">
    (function ($) { $.fn.equalHeights = function (minHeight, maxHeight) { tallest = (minHeight) ? minHeight : 0; this.each(function () { if ($(this).height() > tallest) { tallest = $(this).height() } }); if ((maxHeight) && tallest > maxHeight) tallest = maxHeight; return this.each(function () { $(this).height(tallest) }) } })(jQuery)
    $(window).load(function ()
    {
        if ($(".maxheight-feat").length)
        {
            $(".maxheight-feat").equalHeights()
        }
    })
</script>
@{
    if (Model != null && Model.HomePageGroups != null && Model.HomePageGroups.Count > 0)
    {
        foreach (KL.Store.Core.Domain.ProductGroup pGroup in Model.HomePageGroups)
        {
            Html.RenderAction("Get2", "Products", new { id = pGroup.GroupId, itemCount = Parameters.MaxProductCountForHomePage, ColumnCount = pGroup.ColumnCount, ListImageType = pGroup.ListImageType, sort = homeSort, lazyLoad = true, smallMode = false });
        }
        
    <script type="text/javascript">
        function addToWishList(id)
        {
            $("#dialog-form").load("/WishList/List", { ProductId: id });
            $("#dialog-form").dialog("open");
        }
        $(function ()
        {
            $("#dialog:ui-dialog").dialog("destroy");
            $("#dialog-form").dialog({
                autoOpen: false,
                height: 300,
                width: 550,
                modal: true,
                close: function ()
                {
                    allFields.val("").removeClass("ui-state-error");
                }
            });
        });
        $('a.addToCart').click(function ()
        {
            var qsId = $(this).attr('id').split("_")[1];
            $('#cart').load('/Cart/Insert', { id: qsId });
            $('#sepetMinimalContent').load('/Cart/GetMinimal', { showPhotos: true, ShowAcrIcrLinks: true });
            $('body,html').animate({
                scrollTop: 0
            }, 800);
            $(".sepetFull img").delay(1000).fadeOut("slow").fadeIn("slow");
            return false;
        });
    </script>
    <div id="dialog-form" title="Liste Seç">
    </div>        
    }
    else
    {
        Html.RenderAction("Get", "Products", new { id = Parameters.HomePageCategoryId, itemCount = Parameters.MaxProductCountForHomePage, sort = homeSort, order = 1, ColumnCount = ViewBag.ColumnCount, ListImageType = ViewBag.ListImageType });
    }
}
@if (!string.IsNullOrEmpty(Parameters.HomePageSideBanner))
{
    Html.Raw(Parameters.HomePageSideBanner);
}
@if (Parameters.Theme == "Default")
{ 
    <a href="Content/NedenJojumon" title="Neden jojumon?">
        <div class="neden"></div>
    </a>
    <a href="Content/NasilCalisir" title="Nasıl çalışır?">
        <div class="nasil"></div>
    </a>
}
@if (!string.IsNullOrEmpty(Parameters.HomePageUnderBannerCats))
{
    @Html.Raw(Parameters.HomePageUnderBannerCats);
}

@{
    if (Model != null && Model.HomePageGroups != null && Model.HomePageGroups.Count > 0 && Parameters.WebSiteTrackingCode != "")
    { 
    <script type="text/javascript">

        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', '@Parameters.WebSiteTrackingCode']);
        _gaq.push(['_setDomainName', '@Parameters.WebSiteTrackingDomainName']);
        _gaq.push(['_setAllowLinker', true]);
        _gaq.push(['_trackPageview']);

        (function ()
        {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
        })();

    </script>
    }
}
